﻿@model IEnumerable<AutoPartsSearch.Domain.Entities.Dictionary>

@{
    var prefix = "hidden_";
    var delimiter = "|";
    var temp = "Id";
}
<input type="hidden" 
       id="@(prefix + ViewData.TemplateInfo.GetFullHtmlFieldId(string.Empty))" 
       name="@(prefix + ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty))"
       value="@(Model == null ? string.Empty : Model.Select(x => x.Id.ToString()).Aggregate((current, next) => current + delimiter + next))"/>
<select multiple="multiple"
        id="@(ViewData.TemplateInfo.GetFullHtmlFieldId(temp))"
        name="@(ViewData.TemplateInfo.GetFullHtmlFieldName(temp))"></select>

@*@Html.ListBoxFor( x => x, Enumerable.Empty<SelectListItem>(), new { id = "myId"})*@

